package common.rbac.po;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 日志
 * 
 * */
@Entity
@Table(name = "sys_log")
public class Log extends IdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4728792701371833422L;

	/**
	 * 
	 */
	private Integer bigModule;
	

	private String ip;

	private boolean isSuccess;

	/**
	 */
	private Integer littleModule;

	private String msg;

	private Date time;

	private Integer type;

	private String userId;
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Log other = (Log) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	public Integer getBigModule() {
		return bigModule;
	}

	public String getIp() {
		return ip;
	}

	public Integer getLittleModule() {
		return littleModule;
	}

	public String getMsg() {
		return msg;
	}

	public Date getTime() {
		return time;
	}

	public Integer getType() {
		return type;
	}

	public String getUserId() {
		return userId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	public boolean getIsSuccess() {
		return isSuccess;
	}

	public void setBigModule(Integer bigModule) {
		this.bigModule = bigModule;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public void setLittleModule(Integer littleModule) {
		this.littleModule = littleModule;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public void setIsSuccess(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Override
	public String toString() {
		return "Log [id=" + id + ", userId=" + userId + ", ip=" + ip + ", bigModule="
				+ bigModule + ", littleModule=" + littleModule + ", type=" + type + ", msg=" + msg + ", time=" + time
				+ "]";
	}


}